# 方法1
a = 100
b = [100]
while True:
    a /= 2
    b.append(a)
    if len(b) < 10:
        continue
    else:
        break

print(b)
print(f"第十次反弹高度为{b[9]/2}。")
print(f"共经过了{sum(b)*2 - 100}米。")

# 方法2
n = 100
count = 0
lists = []

while count < 10:
    if count == 0:
        lists.append(n)
        n /= 2
        count += 1
    else:
        lists.append(2*n)
        n /= 2
        count += 1
print(lists)



